/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2204 - Ex0
 * <p>Powered by webrx On 2022-09-06 08:24:17
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex0 {
    public static void main(String[] args) {
        int num = 0;
        for (int a = 0; a <= 100 / 5; a++) {
            for (int b = 0; b <= 100/3; b++) {
                for (int c = 0; c <= 100; c++) {
                    ++num;
                    if (a + b + c == 100 && a * 5 + b * 3 + c / 3 == 100 && c % 3 == 0) {
                        System.out.printf("公鸡：%d只，母鸡：%d只，小鸡：%d只。%n", a, b, c);
                    }
                }
            }
        }
        System.out.println(num);
    }
}
